home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.lang.ada,comp.lang.c++,comp.lang.c,comp.lang.modula3,comp.lang.modula2,comp.lang.eiffel
- Path: munta.cs.mu.OZ.AU!fjh
- From: fjh@munta.cs.mu.OZ.AU (Fergus Henderson)
- Subject: Re: type checking in C++ was Re: Hungarian notation
- Message-ID: <9602601.20727@mulga.cs.mu.OZ.AU>
- Sender: news@cs.mu.OZ.AU (CS-Usenet)
- Organization: Computer Science, University of Melbourne, Australia
- References: <4cf8hf$8fe@hopi.gate.net> <DKoBrn.CHs@falcon.daytonoh.attgis.com> <4d1j37$ge8@stc06.ctd.ornl.gov> <9601221.15716@mulga.cs.mu.OZ.AU> <4djlme$kf3@gaia.ns.utk.edu>
- Date: Thu, 25 Jan 1996 14:39:02 GMT
-
- mbk@I_should_put_my_domain_in_etc_NNTP_INEWS_DOMAIN (Matthew B. Kennel) writes:
-
- >Fergus Henderson (fjh@munta.cs.mu.OZ.AU) wrote:
- >: mbk@jt3ws1.etd.ornl.gov (Kennel) writes:
- >
- >: >// delete p;
- >: >// delete [] p;
- >
- >: Yes, that is still a problem. However, it is less of a problem than
- >: it used to be, because there is now a standard `vector<T>' class
- >: which can be used instead of C's builtin arrays.
- >
- >That's good to hear. Is this widely implemented?
-
- A free implementation has been available for a while now; there are
- also a couple of different commercial implementations from third-party
- library vendors. Compilers that come with vector<T> already in their
- standard library have just started appearing recently.
-
- >Is it as efficient as built-in arrays?
-
- Nearly. One difference is that elements are always allocated on the heap,
- not the stack, even if the array size is known at compile time.
-
- >Can it handle value types as T as well as pointers?
-
- Yes.
-
- --
- Fergus Henderson WWW: http://www.cs.mu.oz.au/~fjh
- fjh@cs.mu.oz.au PGP: finger fjh@128.250.37.3
-